<template>
    <button @click="total1++">投票{{ total1 }}</button>


</template>

<script>
import { number } from '../node_modules/echarts/index';


export default {
    data() {
        return {
            total1: this.total
        }
    },
    props: {
        'total': {
            type:Number,
            default:0
        }
        
    },
    watch:{
        total(newtotal){
            this.total1 = newtotal
        },
        total1(newtotal){
            this.$emit('chenge', newtotal)
        }
    }
}
</script>

<style>
.Miovote {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 20px;
}
</style>